import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import babel from 'vite-plugin-babel';

// https://vite.dev/config/
export default defineConfig({
  plugins: [
      vue(),
      babel({
        babelConfig: {
            presets: [
                [
                    "@babel/preset-env",
                    {
                        targets: "ie >= 9",
                        // useBuiltIns: "usage",
                        // corejs: 3,
                        modules: false
                    }
                ],
            ],
        },
      }),
  ],
  optimizeDeps: {
      exclude: ['@ffmpeg/ffmpeg', '@ffmpeg/util']
  },
  server: {
      headers: {
          'Cross-Origin-Opener-Policy': 'same-origin',
          'Cross-Origin-Embedder-Policy': 'require-corp'
      }
  }
})
